package test5.lupeng.jf.com.teamdemo.fragment;

import android.app.Dialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.support.annotation.Nullable;
import android.support.design.widget.BottomSheetDialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Toast;

import java.io.File;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import test5.lupeng.jf.com.teamdemo.R;

/**
 * Created by Administrator on 2017/7/29.
 */

public class CustomBottomSheetDialogFragment extends BottomSheetDialogFragment {
    @BindView(R.id.rl_photo)
    RelativeLayout rlPhoto;
    @BindView(R.id.rl_album)
    RelativeLayout rlAlbum;
    @BindView(R.id.rl_cancle)
    RelativeLayout rlCancle;
    @BindView(R.id.bottomSheetLayout)
    LinearLayout bottomSheetLayout;
    Unbinder unbinder;
    private String picPath;


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.bottom_menu, container, false);
        unbinder = ButterKnife.bind(this, view);
        return view;
    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.rl_photo, R.id.rl_album, R.id.rl_cancle})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.rl_photo:
                 listener.photo();
                break;
            case R.id.rl_album:
                  listener.album();
                break;
            case R.id.rl_cancle:
                 listener.cancle();
                break;
        }
    }
public interface Listener{
    void photo();
    void album();
    void cancle();
};
public Listener  listener;
public void setListener(Listener listener){
    this.listener=listener;
}


}
